﻿using System.Web;

namespace TSharp.Core.Authentication.Facade
{
    /// <summary>
    /// 
    /// <para>2010/7/9</para>
    /// 	<para>TANGJINGBO</para>
    /// 	<para>tangjingbo</para>
    /// </summary>
    public interface IUserExtendService
    {
        /// <summary>
        /// Deletes the extend.
        /// </summary>
        /// <param name="context">The context.</param>
        /// <param name="username">The username.</param>
        void DeleteExtend(HttpContextBase context, string username);

        /// <summary>
        /// Deletes the extend.
        /// </summary>
        /// <param name="context">The context.</param>
        /// <param name="user">The user.</param>
        void DeleteExtend(HttpContextBase context, IUser user);

        /// <summary>
        /// Updates the extend.
        /// </summary>
        /// <param name="context">The context.</param>
        /// <param name="user">The user.</param>
        void UpdateExtend(HttpContextBase context, ref IUser user);

        /// <summary>
        /// 从数据库重新读取用户扩展信息
        /// </summary>
        /// <param name="context">The context.</param>
        /// <param name="user">The user.</param>
        /// <returns></returns>
        IUser GetExtend(HttpContextBase context, ref IUser user);

        /// <summary>
        /// 将user中扩展内容插入到数据库
        /// </summary>
        /// <param name="context">The context.</param>
        /// <param name="user">The user.</param>
        void AddExtend(HttpContextBase context, ref IUser user);
    }
}